<template>
	<view>
		<view class="listbox" v-if="kong==true" v-for="(item,index) in list" :key="index" @click="tohelp(item)">
			<view>{{item.title}}</view>
		</view>
		<kong v-if="kong==false"></kong>
	</view>
</template>

<script>
	import kong from '../../components/kong.vue'
	export default {
		components:{
			kong
		},
		data() {
			return {
				list:[],
				kong:null,
			}
		},
		onLoad() {
			this.getlist()
		},
		methods: {
			getlist(){
				this.$http({
					url:'api/wechat/helpList'
				}).then(res=>{
					this.list  = res.data
					if(this.list.length==0){
						this.kong = false
					}else{
						this.kong = true
					}
				})
			},
			tohelp(item){
				uni.navigateTo({
					url:'/personalData/richtext/richtext?id='+item.id
				})
			}
		}
	}
</script>

<style>
	page{
		background-color: #F7F7F7;
	}
</style>
<style lang="scss" scoped>
	.listbox{
		width: 100%;
		height: 120rpx;
		background: #FFFFFF;
		border-radius: 10rpx;
		margin-bottom: 24rpx;
		>view{
			margin: 0 30rpx;
			font-size: 28rpx;
			font-family: Source Han Sans CN-Medium, Source Han Sans CN;
			font-weight: 500;
			color: #222222;
			line-height: 120rpx;
		}
	}

</style>
